class Showjg extends eui.Component implements  eui.UIComponent {
    private btnc:eui.Button;
	private game:GameScene;
	private df:string;
	private showdf:eui.Label;
	private showmaxdf:eui.Label;
	public constructor() {
		super();
	}

	protected partAdded(partName:string,instance:any):void
	{
		super.partAdded(partName,instance);
	}
    public setdf(a:number){
       this.df=JSON.stringify(a)
	}

	protected childrenCreated():void
	{
		super.childrenCreated();
		this.btnc.touchEnabled=true
        this.showdf.text=this.df
		this.showmaxdf.text=localStorage.getItem("df")
		this.btnc.addEventListener(egret.TouchEvent.TOUCH_TAP,this.bgtouch,this)
	}
	private bgtouch(){
		//this.visible=false
		this.game=new GameScene();
		//this.game.cleargame();
		//this.game.createGameScene();
		this.addChild(this.game)
	}
}